﻿@model WebMobile.Models.LogonViewModel
           
<div class="art-post">
    <div class="art-post-tl">
    </div>
    <div class="art-post-tr">
    </div>
    <div class="art-post-bl">
    </div>
    <div class="art-post-br">
    </div>
    <div class="art-post-tc">
    </div>
    <div class="art-post-bc">
    </div>
    <div class="art-post-cl">
    </div>
    <div class="art-post-cr">
    </div>
    <div class="art-post-cc">
    </div>
    <div class="art-post-body">
        <div class="art-post-inner art-article">
            <h2 class="art-postheader">Register new user</h2>
            <div class="art-postcontent">
                <!--Content go here -->
                <form action="GetAuthenticate?ReturnUrl=@HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"])" method="post" id="openid_form">
                <input type="hidden" name="action" value="verify" />
                <div>
                    <fieldset>
                        <legend>Login using OpenID</legend>
                        <div class="openid_choice">
                            <p>
                                Please click your account provider:</p>
                            <div id="openid_btns">
                            </div>
                        </div>
                        <div id="openid_input_area">
                            @Html.TextBox("openid_identifier")
                            <input type="submit" value="Log On" />
                        </div>
                        @if (Model != null)
                        {
                            if (Model.User != null)
                            { 
                                <p>Your ID: <b>@Model.User.ProviderKey</b></p>
                            }
                            <p>@Model.LoginStatus</p>
                            if (Model.IsExistedUser)
                            {
                                <p>Your ID 've been associated with account <b>@Model.User.Name</b>. To register a new account, please choose a new ID provider.</p>
                            }
                        }
                    </fieldset>
                </div>
                </form>

                @using (Html.BeginForm("CreateUser", "Account", FormMethod.Post, new { id = "create-user-form" }))
                {
                    <div>
                        <fieldset>
                            <legend>Login using OpenID</legend>
                            <div>Provider key:</div>
                            <div>@Html.TextBox("User.ProviderKey", (Model == null || Model.User == null) ? string.Empty : Model.User.ProviderKey)</div>
                            <div>Email:</div>
                            <div>@Html.TextBoxFor(m => m.User.Name)</div>
                            <div>Password:</div>
                            <div>@Html.PasswordFor(m => m.User.Password)</div>
                             <div>Retype Password:</div>
                            <div>@Html.Password("retype_password")</div>
                           <div><input type="submit" value="Create User" /></div>
                        </fieldset>
                    </div>
                }
                <!--/Content go here -->
            </div>
            <div class="cleared">
            </div>
        </div>
        <div class="cleared">
        </div>
    </div>
</div>
@section Footer {
     <script src="@Url.Content("~/Scripts/openid-jquery.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/openid-en.js")" type="text/javascript"></script>    
    <script type="text/javascript">
        $(document).ready(function () {
            openid.init('openid_identifier');
        });
    </script>
}
@section HeaderScript {
   
}